﻿namespace apitest.Application.Test.Services
{
    [DynamicApiController]
    public class Test6Service 
    {
        ISqlSugarClient _db;
        public Test6Service(ISqlSugarClient db)
        {
            _db = db;
        }

        public async Task<dynamic> t1()
        {
             Task.Run(  () =>
            {
                  t2();
                  t3();
            });
            return "this is t1";
        }

        public async Task<dynamic> t2()
        {
            Thread.Sleep(3000);
            throw new Exception("t2 error");
            Console.WriteLine("2222222222222222");
            return 333;
        }

        public async Task<dynamic> t3()
        {
            Thread.Sleep(5000);
            Console.WriteLine("3333333333333333");
            return 333;
        }
    }
}
